/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.unicon.autoservicio.bean;


/**
 *
 * @author JMENDOZA | 20140131 | Proy. 817: Consulta de despachos
 * @author JMENDOZA | 20140306 | Proy. 817: Se agrega nueva propiedad plantaZ, que obtiene la primera letra del codigo de planta
 */


import com.unicon.sdc.ds.ws.DespachosCSBean;
import java.util.Date;

public class DespachoCSViewBean extends DespachosCSBean{
    
    private Date orderDate_;
    private Date toJobTime_;
    private Date onJobTime_;
    private Date beginUnldTime_;
    private Date endUnldTime_;
    private String plantaZ;
    
    public DespachoCSViewBean(){
    }
    
    
    public DespachoCSViewBean(DespachosCSBean parent){        
        this.orderDate              = parent.getOrderDate();
        this.orderCode              = parent.getOrderCode();
        this.orderIntrnlLineNum     = parent.getOrderIntrnlLineNum();
        this.schedNum               = parent.getSchedNum();
        this.schlNum                = parent.getSchlNum();
        this.tktCode                = parent.getTktCode();
        this.guia                   = parent.getGuia();
        this.plantCode              = parent.getPlantCode();
        this.plantName              = parent.getPlantName();
        this.truckCode              = parent.getTruckCode();
        this.itemCat                = parent.getItemCat();
        this.itemDescr              = parent.getItemDescr();
        this.shortProdDescr         = parent.getShortProdDescr();
        this.delvQty                = parent.getDelvQty();
        this.usageCode              = parent.getUsageCode();
        this.usageDescr             = parent.getUsageDescr();
        this.toJobTime              = parent.getToJobTime();
        this.onJobTime              = parent.getOnJobTime();
        this.beginUnldTime          = parent.getBeginUnldTime();
        this.endUnldTime            = parent.getEndUnldTime();
        this.nuEtapa                = parent.getNuEtapa();
        this.deEtapa                = parent.getDeEtapa();
        this.teo                    = parent.getTeo();
    }

    /**
     *
     * @return
     */
    public Date getOrderDate_() {
        if (getOrderDate() != null) {
            orderDate_ = getOrderDate().toGregorianCalendar().getTime();
        }
        return orderDate_;
    }

    public void setOrderDate_(Date orderDate_) {
        this.orderDate_ = orderDate_;
    }

 

    public Date getToJobTime_() {
        if (getToJobTime() != null) {
            toJobTime_ = getToJobTime().toGregorianCalendar().getTime();
        }
        return toJobTime_;
    }

    public void setToJobTime_(Date toJobTime_) {
        this.toJobTime_ = toJobTime_;
    }

    public Date getOnJobTime_() {
        if (getOnJobTime() != null) {
            onJobTime_ = getOnJobTime().toGregorianCalendar().getTime();
        }
        return onJobTime_;
    }

    /**
     *
     * @param onJobTime_
     */
    public void setOnJobTime_(Date onJobTime_) {
        this.onJobTime_ = onJobTime_;
    }

    /**
     *
     * @return
     */
    public Date getBeginUnldTime_() {
        if (getBeginUnldTime() != null) {
            beginUnldTime_ = getBeginUnldTime().toGregorianCalendar().getTime();
        }
        return beginUnldTime_;
    }

    public void setBeginUnldTime_(Date beginUnldTime_) {
        this.beginUnldTime_ = beginUnldTime_;
    }

    public Date getEndUnldTime_() {
        if (getEndUnldTime() != null) {
            endUnldTime_ = getEndUnldTime().toGregorianCalendar().getTime();
        }
        return endUnldTime_;
    }

    public void setEndUnldTime_(Date endUnldTime_) {
        this.endUnldTime_ = endUnldTime_;
    }

    public String getPlantaZ() {
        plantaZ = getPlantCode().trim().substring(0, 1);
        return plantaZ;
    }

    public void setPlantaZ(String plantaZ) {
        this.plantaZ = plantaZ;
    }
    
    
    
}